
package com.tools.cleanmaster.ui.card.viewholder;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.tools.ad.EntranceType;
import com.tools.cleanmaster.CleanApplication;
import com.tools.cleanmaster.R;
import com.tools.cleanmaster.ui.card.ACardItem;

public class CommonCardViewHolder extends ACardViewHolder {

    public ImageView mLogo;
    public TextView mTitle;
    public TextView mDesc;
    public ImageView mAdCorner;
    public TextView mExecute;
    public ImageView mSmallLogo;
    public EntranceType mPageEntrance;

    @Override
    public View initView(Activity activity, ACardItem card, int pos, EntranceType entrance) {
        mPageEntrance = entrance;

        LayoutInflater layoutInflater = LayoutInflater.from(CleanApplication.getInstance());
        mItemView = layoutInflater.inflate(R.layout.common_card_layout, null);
        mLogo = mItemView.findViewById(R.id.func_logo);
        mTitle = mItemView.findViewById(R.id.func_title);
        mDesc = mItemView.findViewById(R.id.func_desc);
        mExecute = mItemView.findViewById(R.id.func_execute);
        mSmallLogo = mItemView.findViewById(R.id.func_logo_small);
        mAdCorner = mItemView.findViewById(R.id.func_ad_corner);
        return mItemView;
    }
}
